home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
C
/
GCC
/
CLIB
/
!clib
/
h
/
setjmp
< prev
next >
Wrap
Text File
|
1997-03-22
|
1KB
|
41 lines
/* setjmp.h
For use with the GNU compilers and the SharedCLibrary.
(c) Copyright 1997, Nick Burrett. */
#ifndef __SETJMP_H
#define __SETJMP_H
#ifdef __cplusplus
extern "C" {
#endif
/* Objects of type jmp_buf hold the state information to be
restored by a non-local exit. */
#ifdef __JMP_BUF_SIZE
typedef int jmp_buf[__JMP_BUF_SIZE];
#else
typedef int jmp_buf[21];
#endif
/* setjmp stores information about the execution state of the
program in 'state' and returns zero. If longjmp is later
used to perform a non-local exit to this 'state', setjmp
returns a nonzero value. */
#ifdef __STDC__
#define setjmp(jmp_buf) (setjmp(jmp_buf))
#endif
extern int setjmp (jmp_buf state);
/* Restore the current execution to the state saved in 'state'.
Returning from setjmp by means of longjmp returns 'value'
argument that was passed to longjmp rather than 0. If 'value'
is 0, setjmp returns 1. */
extern void longjmp (jmp_buf state, int value);
#ifdef __cplusplus
}
#endif
#endif